<?php //$this->Html->meta("keywords", h($article['Article']['meta_key']), array("inline" => false));?>
<?php //$this->Html->meta("description", h($article['Article']['meta_desc']), array("inline" => false));?>
<?php $this->Html->css('/css/products.css', array("inline" => false));?>
<?php echo $this->element('sub_menu'); ?>
  <div class="container mt-10 pt-30 all-products">
    <div id="Side" class="col-sm-4 col-md-4">
      <h2 class="title-category">All Brands</h2>
      <ul class="right-menu mb-50">
        <?php 
        foreach($brands as $key=>$brand) : 
          if($key%2==0) $class ='class="odd"';
          else $class ='class="even"';
        ?>
        <li <?php echo $class;?>>
          <!--<a href="/product_brand/view/<?php echo $brand['ProductBrand']['id']?>"><?php echo $brand['ProductBrand']['brand_name'. $code]?></a>-->
          <?php echo $this->Html->link( $brand['ProductBrand']['brand_name'. $code], array(
                'controller' => 'product_brand',
                'action' => 'view',
                'id' => $brand['ProductBrand']['id'],
                'slug' => str_replace(' ', '-', $brand['ProductBrand']['brand_name'. $code])
            ));
            ?>
        </li>
        <?php endforeach;?>
      </ul><!-- /right-menu -->

      <?php echo $this->element('video');?>
    </div><!-- /#Side -->

    <div id="Main" class="col-sm-8 col-md-8">
      <section class="row cf mb-40">
        <div class="col-md-12">
          <h2 class="title-h2"><?php echo __('Brands')?></h2>
          <div class="clear">
            <p class="text-01 mb-10 pr-50 bd-b1 pb-20" align="justify">The United Vision company established with a slogan: Quality comes first. Therefore, all kinds of our products are guaranteed with high quality so that not only our custumers, but also your customers are really satisfied.</p>
          </div>
        </div>
      </section><!-- /section -->

      <section class="product-list row cf mb-40">        
        <?php foreach($brands as $key=>$brand) : 
            if($key % 3 == 0 && $key != 0) :
                echo '</section><section class="product-list row cf mb-40">';
            endif;
        ?>
        <div class="col-xs-6 col-sm-4 col-md-4">
          <div class="item-allbrand">
            <div class="">
              <img src="/files/images/<?php echo $brand['ProductBrand']['thumb'];?>" alt="" class="img-responsive">
            </div>
            <h3 class="brand-title pl-10 pr-10">
              <!--<a href="/product_brand/view/<?php echo $brand['ProductBrand']['id']?>">
                <?php echo $brand['ProductBrand']['brand_name'. $code];?>
              </a>-->
              <?php echo $this->Html->link( $brand['ProductBrand']['brand_name'. $code], array(
                    'controller' => 'product_brand',
                    'action' => 'view',
                    'id' => $brand['ProductBrand']['id'],
                    'slug' => str_replace(' ', '-', $brand['ProductBrand']['brand_name'. $code])
                ));
                ?>
            </h3>
            <p class="pl-10 pr-10 pb-15" align="justify">
            <?php 
              App::uses('String', 'Utility');
              echo String::truncate($brand['ProductBrand']['short_des'. $code], 75, 
                array(
                  'ellipsis' => '[...]',
                  'exact' => false
                )
              );
            ?>
            </p>
          </div>
        </div>
        <?php endforeach;?>

      </section><!-- /section -->
    </div><!-- /#Main -->
</div><!-- /container -->